package cn.crawler.app.sys.modules.models;

import cn.crawler.framework.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@Table("sys_param")
@Data
public class SysParam extends BaseModel implements Serializable {
    private static final long serialVersionUID = 1L;

    @Column
    @Name
    @Comment("ID")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(els = {@EL("uuid()")})
    private String id;

    //邮箱相关
    @Column
    @Comment("邮箱地址")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @Default("smtp.ballgold365.com")
    private String emailHost;

    @Column
    @Comment("邮箱端口:win25/centOS465|587")
    @ColDefine(type = ColType.INT, width = 8)
    @Default("25")
    private Integer emailPort;

    @Column
    @Comment("邮箱用户")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @Default("sys@ballgold365.com")
    private String emailUser;

    @Column
    @Comment("邮箱密码")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @Default("777978@!JJ")
    private String emailPassword;

    @Column
    @Comment("邮件标题")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @Default("BallGold")
    private String emailTitle;

    @Column
    @Comment("邮件内容，验证码需带上[%s]，例 --> 验证码：[%s]")
    @ColDefine(type = ColType.VARCHAR, width = 128)
    @Default("Verify Code:[%s]")
    private String emailContent;

    @Column
    @Comment("邮件接收人")
    @ColDefine(type = ColType.VARCHAR, width = 128)
    private String emailReceiver;

}
